#ifndef __SCNS_DHT11_H__
#define __SCNS_DHT11_H__

#include "ScnsConfig.h"

#if defined(SCNS_DHT11_ENABLE)&&SCNS_DHT11_ENABLE==1

#include "ScnsBspDht11.h"

#include "ScnsYing.h"

typedef enum
{
    SCNS_DHT11_STATUS_OK=SCNS_YING_STATUS_OK,
    SCNS_DHT11_STATUS_BSP_FAILED=SCNS_YING_STATUS_BSP_FAILED,
    SCNS_DHT11_STATUS_FAILED=SCNS_YING_STATUS_FAILED,
    SCNS_DHT11_STATUS_TIME_OUT=SCNS_YING_STATUS_TIME_OUT,
    SCNS_DHT11_STATUS_CRC_FAILED,
}ScnsDht11Status;

typedef struct
{
    uint8 temperature;
    uint8 humidity;
}ScnsDht11Result;

extern ScnsDht11Result scnsDht11Result[SCNS_DHT11_MAX];

extern ScnsDht11Status scnsDht11Init(ScnsDht11Enum dhtN);
extern void scnsDht11Interrupt(ScnsDht11Enum dhtN);
#endif
#endif
